package him.action.factory;

import him.action.Action;
import him.action.ActionFactory;
import him.action.education.test.TestIngListAction;
import him.action.education.test.TestInsertAction;
import him.action.education.test.TestInsertBfAction;
import him.action.education.test.TestInsertStuAction;
import him.action.education.test.TestSearchAction;
import him.action.education.test.TestSearchBfAction;

public class EducationActionFactory implements ActionFactory {
	private static EducationActionFactory factory;
	
	public static EducationActionFactory getInstance(){
		if (factory==null) {
			factory=new EducationActionFactory();
		}
		return factory;
	}
	@Override
	public Action getAction(String command) {
		Action action = null;
		if (command.equalsIgnoreCase("testInsert")) {
			action = new TestInsertAction();
		}else if (command.equalsIgnoreCase("testInsertBf")) {
			action = new TestInsertBfAction();
		}else if (command.equalsIgnoreCase("testIngList")) {
			action = new TestIngListAction();
		}else if (command.equalsIgnoreCase("testSearchBf")) {
			action = new TestSearchBfAction();
		}else if (command.equalsIgnoreCase("testSearch")) {
			action = new TestSearchAction();
		}else if (command.equalsIgnoreCase("testInsertStu")) {
			action = new TestInsertStuAction();
		}
		return action;
	}

}
